<include file="Common:header" />
<!-- /. NAV SIDE  -->
<include file="Common:left" />
<!-- /. NAV SIDE  -->
<style>
	.goodcss1{
		white-space:nowrap;
	}
	.goodsimgcss{
		width:50px;
	}
	.avatarurl{
		width:30px;
		border-radius:50%;
      height: 30px;
	}
	.fontcssgreen{
		color:#009688
	}
	.fontcssred{
		color:#f36a5a
	}
	.commissioncss{
		line-height:21px;
	}
</style>
<div id="page-wrapper">
	<div class="header">
		<h1 class="page-header">
			订单管理 <small>Welcome {$Think.config.system_tag}</small>
		</h1>
		<ol class="breadcrumb">
			<li><a href="{:U('Index/index')}">首页</a></li>
			<li class="active">退款订单列表</li>
			<div style="float:right"></div>
		</ol> 
	</div>
	<div id="page-inner">
		<div class="row">
			<div class="col-xs-12">
				<!--Search content-->
				<div class="panel panel-default" style="margin-bottom:0px; border-bottom:none">
					<div class="panel-body">
						<form class="layui-form" action="{:U('Orders/orderRefundList')}" method="post">
							<div class="layui-form-item">
								<label class="layui-form-label" style="width:auto;">订单号</label>
								<div class="layui-input-inline">
									<input value="{$filter.order_id}" type="text" name="order_id" placeholder="请输入订单号" autocomplete="off" class="layui-input">
								</div>
								<label class="layui-form-label" style="width:auto;">用户名</label>
								<div class="layui-input-inline">
									<input value="{$filter.user_name}" type="text" name="user_name" placeholder="请输入用户名" autocomplete="off" class="layui-input">
								</div>
								<div class="layui-input-inline" style="width:auto;">
									<button type="submit" class="btn btn-default">搜索</button>
								</div>
							</div>
						</form>
					</div>
				</div>
				<!--Search content-->
				<!--Formlist content-->
				<div class="panel panel-default">
					<div class="panel-body">
						<div class="table-responsive">
							<table class="table table-hover">
								<thead>
									<tr>
										<th class="goodcss1">订单号</th>
										<th class="goodcss1">头像</th>
										<th class="goodcss1">所属用户</th>
										<th class="goodcss1">订单总金额</th>
										<th class="goodcss1">退款金额</th>
										<th class="goodcss1">订单状态</th>
										<th class="goodcss1">下单时间</th>
										<th class="goodcss1">操作</th>
									</tr>
								</thead>
								<tbody>
									<volist name="ordersList" id="vo">
										<tr>
											<td class="goodcss1">{$vo.order_id}</td>
											<td class="goodcss1"><img src="{$vo.avatarurl}" border="0" class="avatarurl"></td>
											<td class="goodcss1">{$vo.username}</td>
											<td class="goodcss1">{$vo.original_amount}</td>
											<td class="goodcss1">{$vo.total_amount}</td>
											<td class="goodcss1">
											    <if condition="$vo['status'] eq 1">
											        待收货
											    <elseif condition="$vo['status'] eq 2" />
											        商品待确认
											    <elseif condition="$vo['status'] eq 4" />
											        待审核
											    <elseif condition="$vo['status'] eq 5" />
											        待退款
											    <elseif condition="$vo['status'] eq 6" />
											        退款完成
											    <elseif condition="$vo['status'] eq 7" />
											        已取消
											    </if>
											</td>
											<td class="goodcss1">{$vo['addtime']}</td>
											<td class="goodcss1">
												<button class="layui-btn layui-btn-xs" onclick="openlayer('订单详情','{:U(\'Orders/orderRefundDetail\',array(\'id\'=>$vo[\'id\']))}');return false;">详</button>
												<if condition="$vo['status'] eq 4">
												    <a href="#" onclick="openlayer('审核','{:U(\'Orders/auitOrderRefund\',array(\'id\'=>$vo[\'id\']))}');return false;">审核</a>
												</if>
												<if condition="$vo['status'] eq 5">
												    <a href="#" onclick="if(confirm('确定要退款？')){ajaxBox('{:U(\'Orders/completeOrderRefund\',array(\'id\'=>$vo[\'id\']))}')}return false;">退款</a>
												</if>
												<if condition="$vo['status'] eq 2 || $vo['status'] eq 1">
												    <a href="#" onclick="if(confirm('确认货已收到吗？')){ajaxBox('{:U(\'Orders/confirmOrderRefund\',array(\'id\'=>$vo[\'id\']))}')}return false;">确认</a>
												</if>
											</td>
										</tr>
									</volist>
								</tbody>
							</table>
							{$page}
						</div>
					</div>
				</div>
				<!--Formlist content-->
			</div>
		</div>
	</div>
	<include file="Common:foot" />
	<script>
		layui.use('form', function(){
		  var form = layui.form;
		});
	</script>
	 <!-- /. PAGE INNER  -->
</div>
<include file="Common:footer" />
    